<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>鼠标滚轮事件</title>
    <style>
        .list {
            width: 200px;
            height: 100px;
            background-color: blue;
            overflow: auto;
        }

        li {
            height: 50px;
        }
    </style>
</head>
<body>
<div id="app">
    <ul class="list" v-on:wheel="scrol">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
    </ul>

    <ul class="list" v-on:scroll="scrol">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
    </ul>

</div>

<script type="module">
    import {createApp} from "../../../js/vue.esm-browser.js";

    let app = createApp(
        {
            setup() {
                function scrol(event) {
                    console.log(event);
                }

                return {
                    scrol,
                }
            }
        }
    );

    app.mount("#app")
</script>
</body>
</html>